home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / browsercomps / nsIBrowserGlue.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  4KB  |  115 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIBrowserGlue.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIBrowserGlue_h__
  6. #define __gen_nsIBrowserGlue_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsIDOMWindow; /* forward declaration */
  18.  
  19.  
  20. /* starting interface:    nsIBrowserGlue */
  21. #define NS_IBROWSERGLUE_IID_STR "6d340848-9bc1-49a3-9073-99932bbc2a11"
  22.  
  23. #define NS_IBROWSERGLUE_IID \
  24.   {0x6d340848, 0x9bc1, 0x49a3, \
  25.     { 0x90, 0x73, 0x99, 0x93, 0x2b, 0xbc, 0x2a, 0x11 }}
  26.  
  27. /**
  28.  * nsIBrowserGlue is a dirty and rather fluid interface to host shared utility 
  29.  * methods used by browser UI code, but which are not local to a browser window.
  30.  * The component implementing this interface is meant to be a singleton
  31.  * (service) and should progressively replace some of the shared "glue" code 
  32.  * scattered in browser/base/content (e.g. bits of utilOverlay.js, 
  33.  * contentAreaUtils.js, globalOverlay.js, browser.js), avoiding dynamic 
  34.  * inclusion and initialization of a ton of JS code for *each* window.
  35.  * Dued to its nature and origin, this interface won't probably be the most
  36.  * elegant or stable in the mozilla codebase, but its aim is rather pragmatic:
  37.  * 1) reducing the performance overhead which affects browser window load;
  38.  * 2) allow global hooks (e.g. startup and shutdown observers) which survive
  39.  * browser windows to accomplish browser-related activities, such as shutdown
  40.  * sanitization (see bug #284086)
  41.  *
  42.  */
  43. class NS_NO_VTABLE nsIBrowserGlue : public nsISupports {
  44.  public: 
  45.  
  46.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IBROWSERGLUE_IID)
  47.  
  48.   /** 
  49.    * Deletes privacy sensitive data according to user preferences
  50.    *
  51.    * @param aParentWindow an optionally null window which is the parent of the 
  52.    *        sanitization dialog (if it has to be shown per user preferences)
  53.    *
  54.    */
  55.   /* void sanitize (in nsIDOMWindow aParentWindow); */
  56.   NS_IMETHOD Sanitize(nsIDOMWindow *aParentWindow) = 0;
  57.  
  58. };
  59.  
  60. /* Use this macro when declaring classes that implement this interface. */
  61. #define NS_DECL_NSIBROWSERGLUE \
  62.   NS_IMETHOD Sanitize(nsIDOMWindow *aParentWindow); 
  63.  
  64. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  65. #define NS_FORWARD_NSIBROWSERGLUE(_to) \
  66.   NS_IMETHOD Sanitize(nsIDOMWindow *aParentWindow) { return _to Sanitize(aParentWindow); } 
  67.  
  68. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  69. #define NS_FORWARD_SAFE_NSIBROWSERGLUE(_to) \
  70.   NS_IMETHOD Sanitize(nsIDOMWindow *aParentWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->Sanitize(aParentWindow); } 
  71.  
  72. #if 0
  73. /* Use the code below as a template for the implementation class for this interface. */
  74.  
  75. /* Header file */
  76. class nsBrowserGlue : public nsIBrowserGlue
  77. {
  78. public:
  79.   NS_DECL_ISUPPORTS
  80.   NS_DECL_NSIBROWSERGLUE
  81.  
  82.   nsBrowserGlue();
  83.  
  84. private:
  85.   ~nsBrowserGlue();
  86.  
  87. protected:
  88.   /* additional members */
  89. };
  90.  
  91. /* Implementation file */
  92. NS_IMPL_ISUPPORTS1(nsBrowserGlue, nsIBrowserGlue)
  93.  
  94. nsBrowserGlue::nsBrowserGlue()
  95. {
  96.   /* member initializers and constructor code */
  97. }
  98.  
  99. nsBrowserGlue::~nsBrowserGlue()
  100. {
  101.   /* destructor code */
  102. }
  103.  
  104. /* void sanitize (in nsIDOMWindow aParentWindow); */
  105. NS_IMETHODIMP nsBrowserGlue::Sanitize(nsIDOMWindow *aParentWindow)
  106. {
  107.     return NS_ERROR_NOT_IMPLEMENTED;
  108. }
  109.  
  110. /* End of implementation class template. */
  111. #endif
  112.  
  113.  
  114. #endif /* __gen_nsIBrowserGlue_h__ */
  115.